﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/AdminMaster.master" AutoEventWireup="true" CodeFile="AccreditationCandidateResultEmail.aspx.cs" Inherits="Candidate_AccreditationCandidateResultEmail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script type="text/javascript">
        var WindowObjectReference; // global variable
        function onClickLink(strPath) {
            WindowObjectReference = window.open(strPath, "DescriptiveWindowName", "resizable=yes,scrollbars=yes,status=yes");

        }
        </script>
    <h2>Candidate Result Email for :
        <asp:Label ID="CandidateName" runat="server" Text="Label"></asp:Label>
    </h2>
     <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
      <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="CandidateResultLetterTableAdapters.Usp_GetCandidateResultLetterTableAdapter">
            <SelectParameters>
                <asp:QueryStringParameter Name="CandidateId" QueryStringField="CandidateId" Type="String" />
                <asp:Parameter Name="RegistrationNo" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    
    <br />
    <table>
        <tr><td>Registration No:</td><td>
            <asp:Label ID="RegistrationNo" runat="server"></asp:Label></td></tr>
        <tr><td>Email Id:</td><td>
        <asp:Label ID="EmailId" runat="server" ></asp:Label></td></tr>       
        <%--<tr><td>Upload Covering Letter :</td><td>
            <asp:FileUpload ID="FUCoveringLetter" runat="server" /><br /><asp:Button ID="BtnUploadCovertingLetter" runat="server" Text="Upload" OnClick="BtnUploadCovertingLetter_Click" /></td></tr>--%>
        <tr><td></td><td>
            <asp:Button ID="BtnGenerateDocs" runat="server" Text="Generate Documents" OnClick="BtnGenerateDocs_Click" /></td></tr>
        <tr><td></td><td></td> </tr>
        <tr><td>Send Email:</td><td>
            <asp:Button ID="BtnSendEmail" runat="server" Text="Send Email" Enabled="false" OnClick="BtnSendEmail_Click" /></td></tr>
         <tr><td></td><td></td></tr>
        <tr><td>Email Sent Counter:</td><td>
            <asp:Label ID="EmailCounter" runat="server" ></asp:Label></td></tr>       
    </table>
    <br />
    <asp:GridView ID="gvResultEmailDocs" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" Width="95%" Height="40%">
        <Columns>
<asp:BoundField DataField="ID" HeaderText="ID" Visible="False">
</asp:BoundField>
            <asp:BoundField DataField="DocumentTypeCode" HeaderText="&nbsp;Document Type">
            </asp:BoundField>
            <asp:BoundField DataField="DocumentPath" HeaderText="&nbsp;Document Path" Visible="false">
                <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="20%" />
                <HeaderStyle HorizontalAlign="Left" />
            <HeaderStyle HorizontalAlign="Left" />
            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="20%" />
            </asp:BoundField>
            <asp:TemplateField ItemStyle-Width="10%" HeaderText="Details">
                <ItemTemplate>
                    <asp:HyperLink runat="server" NavigateUrl='<%# GetDocumentDownload(Eval("DocumentPath"))%>' Text="Download"></asp:HyperLink>                    
                </ItemTemplate>
                <ItemStyle Width="10%"></ItemStyle>
            </asp:TemplateField>
           <%-- <asp:TemplateField HeaderText="&nbsp;Allocate Assessor" ShowHeader="false">
                            <ItemTemplate>
                                <asp:LinkButton ID="btnPopUp" runat="server" CommandName="POPUP" Text="Allocate"
                                    CommandArgument='<%# Eval("CandidateID")+"="+Eval("RegistrationNo")+"="+Eval("CandidateType")+"="+Eval("CountryName")+"="+Eval("CandidateName")+"="+Eval("UserID")+"="+Eval("PartnerName") +"="+Eval("PartnerID") %>'></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>--%>
        </Columns>
        <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#CCCCCC" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>

</asp:Content>

